Skip to content

Merge in upstream v5.3.0 - #47

Merged
andrew-signal merged 24 commits into
mainfrom
jrose/v5.3.0
Oct 27, 2026
Merged

andrew-signal merged 24 commits into
mainfrom
jrose/v5.3.0

Conversation

@jrose-signal

Copy link
Copy Markdown

Trivial merge conflicts only, no special attention needed after the test updates in #46.

janrueth and others added 22 commits August 14, 2026 17:16
Change all seal/open methods on AeadCtxRef from &self to &mut self.

The TLS-specific AEADs (aes_*_gcm_tls12, aes_*_gcm_tls13) are stateful
and internally mutate the EVP_AEAD_CTX during seal operations (nonce
counter tracking). Using &self allows LLVM to optimize under the
assumption that the context is read-only, which can corrupt nonce state
and cause cryptographic failures. This was the root cause of
cloudflare/quiche#2383.

Using &mut self universally (for both generic and TLS AEADs) is the
simplest fix and prevents this class of bug entirely.

Also adds Algorithm constructors for the four TLS GCM variants:
- aes_128_gcm_tls12 / aes_256_gcm_tls12
- aes_128_gcm_tls13 / aes_256_gcm_tls13

These enforce strictly monotonic nonces at the AEAD level, matching the
TLS 1.2 and TLS 1.3 nonce construction requirements.

Tests cover:
- Round-trip seal/open for all TLS variants
- TLS nonce monotonicity enforcement (reuse and backwards rejected)
- Contrast: generic GCM accepts non-monotonic nonces
Renew the committed CA and leaf certificates used by the TLS test suite after their August 2026 expiration. Deploy risk: test fixtures only; runtime certificates and package behavior are unchanged.
Keep certificate fingerprints, validity assertions, signatures, and bundled certificate expectations aligned with the renewed test fixtures. Deploy risk: test expectations only; runtime behavior is unchanged.
Expose HkdfSuite configured with MessageDigest, returning allocation-free DigestBytes from extract and filling caller-provided output buffers during expand. Preserve BoringSSL errors and enforce RFC 5869 PRK and output-length requirements.

Cover RFC SHA-1 and SHA-256 vectors, independent SHA-384 and SHA-512 vectors, empty inputs, block boundaries, digest-dependent output limits, and short and long PRKs. Document RFC argument semantics.
Most of our patches required work:

1. pq: (a) Upstream removed Kyber. We keep X25519Kyber768 and
   P256Kyber768 by implementing Kyber768 on top of ML-KEM-768.

   (b) Improve documentation of what's currently supported.

2. allow-crl-extensions-bad-version: Properly document what the patch
   actually does. Also improve its tests.

3. relax-cert-validation: Upstream removed enforce_rsa_key_usage;
   inline the behaviour instead.
Enable X25519MLKEM768 in the fips202205 compliance profile, previously
we added P256Kyber768Draft00 to it as well. Update commit message to
reflect that X25519MLKEM768 is already enabled by default.

Update prefix_symbols.h for the added `SSL_use_second_keyshare` API,
otherwise `ninja run_tests` fails.

Remove unnecessary fuzzer and test changes (`-curves`, comments). Remove
NotJustMLKEMKeyShare case, this was a wrongly resolved merge conflict,
NotJustMLKEMKeyShare-X25519MLKEM768 already covers it.
Resolved conflicts due to upstream changes:

 * 4dc638345 Turn SSL_SESSION into an opaque struct
   Simple rename of SSL_SESSION -> SSLSession.
 * ba26b4cb8 Add ssl_compliance_policy_fips_202609
   Trivial context change, updated commit message as well.
Since boringssl 0.20260903.0 (commit defe5810ee8b), the
X509_V_FLAG_TRUSTED_FIRST flag has no effect. Adjust tests accordingly.
We should consider removing this flag and X509_V_FLAG_NO_ALT_CHAINS too
since the constant is zero, any code using it needs to be re-evaluated.
- bindgen relies on clang-sys for parsing headers. Replace the old LLVM
  version in favor of LLVM 20 from windows-latest (windows-2025)..
- Drop explicit installation of nasm, the build log suggests that Perl's
  `C:/Strawberry/c/bin/nasm.exe` version is being used anyway.
- Add missing `x86_64-msvc-static` thing to ensure that the job shows as
  `Test (x86_64-msvc-static)` instead of its properties,
  `Test (x86_64-msvc-static, x86_64-pc-windows-msvc, `...)
- Require Go 1.27 to match BoringSSL. Go is only needed to run BoringSSL
  tests or build with FIPS, remove it from other jobs.
- Disable caching to silence a warning about missing go.sum.
- Use latest setup-go action to upgrade from Node.js 20 to 24.
Removes about 1k symbols, including a conflicting `malloc` definition.
Base automatically changed from jrose/refresh-test-certs to main October 20, 2026 23:23
@andrew-signal
andrew-signal merged commit b518db8 into main Oct 27, 2026
27 checks passed
@andrew-signal
andrew-signal deleted the jrose/v5.3.0 branch October 27, 2026 20:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants